package app.kotlin_1.adapter

import android.content.Context
import app.kotlin_1.base.BaseRecyclerViewAdapter
import app.kotlin_1.base.BaseViewHolder
import app.kotlin_1.bean.GameBean
import  kotlinx.android.synthetic.main.item_gallery.view.*


/**
 * Created by 刘智强 on 2017/9/22.
 */
class GameKindSheJiAdapter : BaseRecyclerViewAdapter<GameBean> {
    private var context: Context? = null
    private var gameBeanList = mutableListOf<GameBean>()
    constructor(context: Context?, datas: MutableList<GameBean>, layoutId: Int?) : super(context, datas, layoutId) {
        this.context = context
        this.gameBeanList = gameBeanList
    }
    override fun bindData(viewHolder: BaseViewHolder, data: GameBean, position: Int) {
        with(data){
            rootView?.sdvGameIcon?.setImageURI(data.icon)
            rootView?.tvGameName?.text = data.name
        }


    }

}